< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03020406.xhp

(section: filecopy) (bookmark: bm_id3154840)
FileCopy statement

FileCopy ステートメント

FileCopy Statement [Runtime]
FileCopy ステートメント [実行時](hd_id3154840.1)

Copies a file.
ファイルをコピーします。(par_id3149497.2)

(/section: filecopy)

Syntax:
構文:(hd_id3147443.3)

FileCopy TextFrom As String, TextTo As String
FileCopy TextFrom As String, TextTo As String(par_id3146957.4)

Parameters:
パラメータ:(hd_id3153825.5)

TextFrom: Any string expression that specifies the name of the file that you want to copy. The expression can contain optional path and drive information. If you want, you can enter a path in URL notation.
TextFrom: コピーするファイル名を指定する文字列表式。 この表式には、オプションでパスやドライブ情報を収めることもできます。 必要であれば、パス指定に URL 指定を用いることもできます。(par_id3155390.6)

TextTo: Any string expression that specifies where you want to copy the source file to. The expression can contain the destination drive, the path, and file name, or the path in URL notation.
TextTo: ソースファイルのコピー先を指定する文字列表式。 この表式にはコピー先のドライブ、パス、ファイル名を含めるか、またはそれらをURLで 指定できます。(par_id3150669.7)

Note Icon 注マーク You can only use the FileCopy statement to copy files that are not opened.
FileCopy ステートメントでコピーできるのは、オープンされていないファイルだけです。(par_id3150791.8)

(embed text/sbasic/shared/00000003.xhp#errorcode : linkinfo)

Error Codes

エラーコード(hd_id3152869.37)

(/embed text/sbasic/shared/00000003.xhp#errorcode)

(embed text/sbasic/shared/00000003.xhp#err5 : linkinfo)

5 Invalid procedure call
5 無効なプロシージャー呼び出しです (par_id3150891.41)

(/embed text/sbasic/shared/00000003.xhp#err5)

(embed text/sbasic/shared/00000003.xhp#err76 : linkinfo)

76 Path not found
76 パスが見つかりません (par_id3150477.75)

(/embed text/sbasic/shared/00000003.xhp#err76)

Example:
例:(hd_id3125863.9)

Sub ExampleFilecopy
Sub ExampleFilecopy(par_id3150869.10)

Filecopy "c:\autoexec.bat", "c:\Temp\Autoexec.sav"
Filecopy "c:\autoexec.bat", "c:\Temp\Autoexec.sav"(par_id3154685.11)

end sub
end sub(par_id3154123.12)


< Prev / Next >